﻿using MODEL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Serialization;

namespace AmazonSystemApplication
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void mWSCategoryToolStripMenuItem_Click(object sender, EventArgs e)
        {
        //    MODEL.AmazonEnvelope envelope = new MODEL.AmazonEnvelope();
        //    envelope.Header = new Header();
        //    envelope.Header.DocumentVersion = "1.01";
        //    envelope.Header.MerchantIdentifier = "AccountName"; 

        //    envelope.MessageType = AmazonEnvelopeMessageType.Product;
             
             

        //    List<AmazonEnvelopeMessage> msgList = new List<AmazonEnvelopeMessage>();
        //    for (int i = 1; i <= 100; i++)
        //    {
        //        MODEL.AmazonEnvelopeMessage msg = new MODEL.AmazonEnvelopeMessage();
        //        msg.MessageID = i.ToString();
        //        msg.OperationType = MODEL.AmazonEnvelopeMessageOperationType.Update;
        //        msg.Item = new Product();

        //        msg.Item.SKU = "AC0603";

        //        msg.Item.Condition = new ConditionInfo();
        //        msg.Item.Condition.ConditionType = ConditionType.New;
        //        msg.Item.Condition.ConditionNote = "ConditionType : 100% new";

        //        msg.Item.DescriptionData = new ProductDescriptionData();
        //        msg.Item.DescriptionData.Title = "产品名";
        //        msg.Item.DescriptionData.Description = "产品说明";
        //        msg.Item.DescriptionData.Brand = "Brand 品牌名";
        //        msg.Item.DescriptionData.BulletPoint = "5个卖点".Split('|');
        //        msg.Item.DescriptionData.Manufacturer = "Brand Company";
        //        msg.Item.DescriptionData.RecommendedBrowseNode = "销售节点".Split('|');

        //        msg.Item.ProductData = new ProductProductData();
        //        msg.Item.ProductData.Item = new object();

        //        Clothing colt = new Clothing();
        //        colt.VariationData = new ClothingVariationData(); ;
        //        colt.VariationData.Parentage = ClothingVariationDataParentage.parent;
        //        colt.VariationData.VariationTheme = ClothingVariationDataVariationTheme.SizeColor;

        //        colt.ClassificationData = new ClothingClassificationData();
        //        colt.ClassificationData.ClothingType = (ClothingClassificationDataClothingType)Enum.Parse(typeof(ClothingClassificationDataClothingType), "");
                



        //    }
            


        //    envelope.Message = msgList.ToArray();


          
            

        //    XmlSerializer serializer = new XmlSerializer(typeof(MODEL.AmazonEnvelope));
        //    FileStream stream=   File.Open("report.xml", FileMode.OpenOrCreate, FileAccess.ReadWrite);
        //    serializer.Serialize(stream, envelope);
        }
    }
}
